<?php echo $this->fetch('member.header.html'); ?>

<script type="text/javascript">
$(function () {
    var chart;
    $(document).ready(function() {
    	chart = new Highcharts.Chart({
    		chart: {
    			renderTo: 'container',
    			type: 'bar'
    		},
    		title: {
    			text: '<?php echo $this->_var['main_title']; ?>'
    		},
    		subtitle: {
    			text: '<?php echo $this->_var['sub_title']; ?>'
    		},
    		xAxis: {
    			categories: [<?php echo $this->_var['result_goods_str']; ?>],
    			title: {
    				text: null
    			},
    			labels: {
	   		         style: {
		   		        fontSize: '12px'
	   		         }
 		      	}
    		},
    		yAxis: {
    			min: 0,
          allowDecimals: false,
    			title: {
    				text: '单位：件',
    				align: 'high'
    			},
    			labels: {
    				overflow: 'justify'
    			}
    		},
    		tooltip: {
    			formatter: function() {
    				return ''+
    					this.series.name +': '+ this.y +' 件';
    			}
    		},
    		plotOptions: {
    			bar: {
    				dataLabels: {
    					enabled: true
    				}
    			}
    		},
    		credits: {
    			enabled: false
    		},
    			series: [{
    			name: '销售量',
    			data: [<?php echo $this->_var['result_clicknum_str']; ?>]
    		}]
    	});
    });
    
});
    $(function() {
        $('#add_time_from').datepicker({dateFormat: 'yymmdd'});
        $('#add_time_to').datepicker({dateFormat: 'yymmdd'});
    });
</script>
<style>
    .ncsc-btn-mini{color: #777;background-color: #F5F5F5;text-align: center;vertical-align: middle;display: inline-block;height:20px;line-height:20px; padding: 0 10px;margin-right: 2px;border: 1px solid #DCDCDC;cursor: pointer;}
</style>
<div class="content">
    <?php echo $this->fetch('member.menu.html'); ?>
    <div id="right">
        <?php echo $this->fetch('member.curlocal.html'); ?>
        <?php echo $this->fetch('member.submenu.html'); ?>
        <div class="wrap">
            <div class="public_index table1">
                <div class="search_order clearfix">
                    <form method="get" class="clearfix">
                        <div style="float:left;">
                            <a href="<?php echo url('app=seller_stat_sale&act=goods'); ?>" id="week_flow" class="ncsc-btn-mini">本周销量</a>
                            <a href="<?php echo url('app=seller_stat_sale&act=goods&type=month'); ?>" id="month_flow" class="ncsc-btn-mini">本月销量</a>
                            <a href="<?php echo url('app=seller_stat_sale&act=goods&type=year'); ?>" id="year_flow" class="ncsc-btn-mini">今年销量</a>
                        </div>    
                        <div style="float:right;">
                            <span class="title">查询时间:</span>
                            <input class="text_normal width2" type="text" name="add_time_from" id="add_time_from" value="<?php echo htmlspecialchars($_GET['add_time_from']); ?>" /> &#8211; <input class="text_normal width2" id="add_time_to" type="text" name="add_time_to" value="<?php echo htmlspecialchars($_GET['add_time_to']); ?>" />
                            <input type="hidden" name="app" value="seller_stat_sale" />
                            <input type="hidden" name="act" value="goods" />
                            <input type="submit" class="btn" value="搜索" />
                        </div>
                    </form>
                </div>
                <div id="container" style="width:990px; height:600px;margin: 0 auto"></div>
            </div>
        </div>
    </div>
    <div class="clear"></div>
</div>
<?php echo $this->fetch('footer.html'); ?>